package Demo7;

import java.io.*;

//字符流
public class BufferedWreiterTest1 {
    public static void main(String[] args) {
        Writer writer = null;
        BufferedWriter bw = null;
        try {
            writer = new FileWriter("f:/Test/f.txt");
            bw = new BufferedWriter(writer);
            bw.write("天气不错");
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                bw.close();
                writer.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
